<!DOCTYPE html >
<html class="moren">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="renderer" content="webkit"> 
	{$_G['setting']['seohead']}
	<!--[if lt IE 9]>
		<script src="//cdn.bootcss.com/html5shiv/r29/html5.min.js"></script>
	<![endif]-->
	<title><!--{if !empty($navtitle)}-->$navtitle<!--{/if}--><!--{if empty($nobbname)}-->$_G['setting']['bbname']<!--{/if}--></title>
	$_G['setting']['seohead']
	<meta name="keywords" content="{if !empty($metakeywords)}{echo dhtmlspecialchars($metakeywords)}{/if}" />
	<meta name="description" content="{if !empty($metadescription)}{echo dhtmlspecialchars($metadescription)} {/if}{if empty($nobbname)},$_G['setting']['bbname']{/if}" />
	<meta name="copyright" content="2001-2013 Comsenz Inc." />
	<base href="{$_G['siteurl']}" />
	<!--{csstemplate}-->
<link rel="stylesheet" type="text/css" href="{$_G['siteurl']}source/plugin/jameson_read/template/read.css?version=988">
<style>
#tools{position:fixed;top:15px;left:14%;margin-left:-70px;width:60px;z-index:7;}
#jameson_read{width:100%;}
#jameson_read .zanshangbutton {display: block;margin:auto;width: 120px;height: 50px;border-radius: 30px;background:#bf2c24;color: #fff;font-size: 22px;line-height: 50px;text-align: center;}
#jameson_read .zanshangbutton:hover{background:  #ed4259;}
#erweimadiv img{margin:15px auto;}
#jameson_read_content{position:relative;width:70%;height:100%;min-width:600px;margin-left:14%;padding:0;padding-bottom:30px;top:0;height:100%;border:0;}
#jameson_read_content h1{font-size:2em;}
#jamesonbookcontent{padding:20px 50px 40px;}
#jameson_read_right,
#jameson_read_left{margin:0 auto;padding:0;border:0;position:fixed;height:100%;text-align:center;z-index:6;top:0;}
#jameson_read_right{right:0;width:16%;max-width:16%;}
#jameson_read_left{left:0;width:14%;max-width:14%;}
.pre,
.next{display:none;position:fixed;z-index:999;top:50%;width:100px;height:40px;line-height:40px;text-decoration:none;background:transparent;text-indent:9999px;outline:0;font-size:0;opacity: 0.5;}
.pre[href]{display:block;left:0px;text-align:right;}
.next[href]{display:block;right:0px;text-align:left;}
{if !$_G['jameson_read']['enableshupiao']}
	.layui-layer-content .shupiaowrap  > .pure-u-1-4{display: none;}
	.layui-layer-content .shupiaowrap  > .pure-u-1-4:last-child{display: block;margin:auto;}
{/if}
{if $_G["jameson_read"]["nocopy"]}
	body{
		-webkit-user-select: none;
    	-moz-user-select: none;
    	-ms-user-select: none;
    	user-select: none;
    	-khtml-user-select: none;
	}
{/if}
{if $_G["jameson_read"]["pindent"]}
	.messagecontent	p,.messagecontent {text-indent: {$_G["jameson_read"]["pindent"]}em;}
{/if}
	</style>
	<script type="text/javascript">var STYLEID = '{STYLEID}', STATICURL = '{STATICURL}', IMGDIR = '{IMGDIR}', VERHASH = '{VERHASH}', charset = '{CHARSET}', discuz_uid = '$_G[uid]', cookiepre = '{$_G[config][cookie][cookiepre]}', cookiedomain = '{$_G[config][cookie][cookiedomain]}', cookiepath = '{$_G[config][cookie][cookiepath]}', showusercard = '{$_G[setting][showusercard]}', attackevasive = '{$_G[config][security][attackevasive]}', disallowfloat = '{$_G[setting][disallowfloat]}', creditnotice = '<!--{if $_G['setting']['creditnotice']}-->$_G['setting']['creditnames']<!--{/if}-->', defaultstyle = '$_G[style][defaultextstyle]', REPORTURL = '$_G[currenturl_encode]', SITEURL = '$_G[siteurl]', JSPATH = '$_G[setting][jspath]', CSSPATH = '$_G[setting][csspath]', DYNAMICURL = '$_G[dynamicurl]';</script>
	<script type="text/javascript" src="{$_G[setting][jspath]}common.js?{VERHASH}"></script>

</head>
<body>
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>
{eval $bookurl = jamesonurl('book',$columinfo['book_id']);}
{eval $xiaoshuourl = jamesonurl('index',0);}
<div id="jameson_read" class="moren">
		<div id="jameson_read_left" >
		</div>
		<div id="jameson_read_content">
			<!--[diy=diy1]--><div id="diy1" class="area"></div><!--[/diy]-->
			<h2 id="tools">
				<a href="./">{lang jameson_read:shouye}</a>
				<a href="{$xiaoshuourl}">{$_G['jameson_read']['jamesonread_title']}</a>
				<a href="javascript:;" onclick="jamesonread.open('mulumenu')">{lang jameson_read:mulu}</a>
				<a onmouseover="javascript:layer.tips('{lang jameson_read:jianxiaolianghao}','#subsize');" href="javascript:;" id="subsize" class="xw1 xs2" onclick="jamesonread.changesize('sub')">A-</a><a href="javascript:;" onmouseover="javascript:layer.tips('{lang jameson_read:morendaxiao}','#morensize');" id="morensize" class="pd0 xw1 xs2" onclick="jamesonread.changesize('moren')">A</a><a href="javascript:;" onmouseover="javascript:layer.tips('{lang jameson_read:zengdalianghao}','#addsize');" onclick="jamesonread.changesize('add')" id="addsize" class="xw1 xs2">A+</a>
				<a href="javascript:;" onclick="jamesonread.open('shuqiandiv')" id="shuqian">{lang jameson_read:bookmark}</a>
				<!-- 只在可读本章节情况下才显示朗读按钮 -->
				{if $shifoukedu > 0 && $_G['jameson_read']['apikey'] && $_G['jameson_read']['secretkey']}
				<a id="playaudio" href="javascript:;" onclick="jamesonread.play()" class="playaudio"  >{lang jameson_read:langdu}</a>
				{/if}
				{if $autobuycookie}
				<a href="javascript:;" onmouseover="javascript:layer.tips('{lang jameson_read:quxiaozidongdingyue}','#noautobuy');"  onclick="jamesonread.noautobuy(this)" id="noautobuy">&times;</a>
				{/if}
			</h2>
			<h2 class="center" id="backtools">
				<a href="javascript:;"  id="u179stranlink">{if preg_match("/TC_/",currentlang())}{lang jameson_read:jianti}{else}{lang jameson_read:fanti}{/if}</a>
				<a href="javascript:;"  onclick="jamesonread.setback('moren')"  class="moren">&nbsp;</a>
				<a href="javascript:;"  onclick="jamesonread.setback('lightyellow')"  class="lightyellow">&nbsp;</a>
				<a href="javascript:;" onclick="jamesonread.setback('greencolor')"  class="greencolor">&nbsp;</a>
				<a href="javascript:;"  onclick="jamesonread.setback('lightgreen')"  class="lightgreen">&nbsp;</a>
				<a href="javascript:;"  onclick="jamesonread.setback('lightred')"  class="lightred">&nbsp;</a>
				<a href="javascript:;"  onclick="jamesonread.setback('gray')"  class="gray">&nbsp;</a>
				<a href="javascript:;" onclick="jamesonread.setback('black')" class="black">&nbsp;</a>
			</h2>
			<div id="jamesonbookcontent" style="font-size: 20px;line-height: 1.8" data-size="20" class="mbm">
				<div id="istext" class="typo">
					{if !$nodisplayauthor}
					<h1 class="center mtm mbn">{$subject}</h1>
					<p class="center xg1 "><a href="{$bookurl}">{$bookinfo['book_name']}<em class="xs1 xg1 xs0"> by {$bookinfo['author']}</em></a></p>
					{/if}
					<p class="center xs1 xg1">
						{eval echo dgmdate($columinfo['addtime']);}
					</p>
					{if $pcyuedugg[0]['adv']}
					<div class="center mtn mbn" style="overflow-x:hidden">
						{eval echo stripcslashes($pcyuedugg[0]['adv']);}
					</div>
					{/if}
					<div class="messagecontent">{$message}</div>
					<!-- 如果不可读，在此显示购买信息 -->
					{if $shifoukedu < 1}
					<div id="goumaitips" class="goumaitips mtm mbm">
						<form action="./plugin.php?id=jameson_read&contrl=index&act=buytids" method="post" 1onsubmit="return jamesonread.disabled('#dingyuebutton')">
						<div class="goumzhangjie text-center">
							<p>{lang jameson_read:goumaibenzhangjiejixu}</p>
								<button id="dingyuebutton" type="button" onclick="jamesonread.disabled()" class="pure-button button-error">{lang jameson_read:goumaibenzhangjie}<em>{$columinfo['price']}{$_G['jameson_read']['trametitle']}</em></button>
								<br>
								<label for="autobuy" class="xs1 xg1 xw0">
									{lang jameson_read:zidonggoumai}
									<input type="checkbox"  name="autobuy" id="autobuy" checked >
								</label>
						</div>
							<input type="hidden" name="formhash" value="{FORMHASH}">
							<input type="hidden" name="tid" value="{$columinfo['tid']}">
							<input type="hidden" name="book_id" value="{$columinfo['book_id']}">
						</form>
					</div>
					{/if}
					{if $_G['jameson_read']['dstrameid']}
					<div class="mtm mbm center">
						<a href="javascript:;" onclick="jamesonread.open('dashangdiv')" class="zanshangbutton">{lang jameson_read:zanshang}</a>
					</div>
					{/if}
					<div class="center">
						{if $predata}
							<a id="prespan" class="prespan" href="{eval echo jamesonurl('thread', $predata['tid'], $predata['pid'], $_G['uid']);}">{lang jameson_read:shangyiye}</a>
						{else}
							<a id="prespan" class="prespan">{lang jameson_read:meiyoule}</a>
						{/if}
						<a class="prespan mulu" style="background: #0E8FEA;" href="{$bookurl}">{lang jameson_read:mulu}</a>
						{if $nextdata}
							<a id="nextspan" class="nextspan" href="{eval echo jamesonurl('thread', $nextdata['tid'], $nextdata['pid'], $_G['uid']);}">{lang jameson_read:xiayiye}</a>
						{else}
							<a id="prespan" class="prespan">{lang jameson_read:meiyoule}</a>
						{/if}
					</div>
					<div class="center"><a href="javascript:;" class="rq xs1 "  onclick="showWindow('miscreport{$columinfo["pid"]}', 'misc.php?mod=report&rtype=post&rid={$columinfo["pid"]}&tid={$columinfo["tid"]}&fid={$_G["jameson_read"]["fid"]}', 'get', -1);return false;">{lang jameson_read:jubao}</a></div>
					{if $pcyuedugg[1]['adv']}
					<div class="center mtn mbn" style="overflow-x:hidden; ">
						{eval echo stripcslashes($pcyuedugg[1]['adv']);}
					</div>
					{/if}
					{if $_G['jameson_read']['fenxiangdaima']}
					<div class="center mbm mtm cl juzhong">
						<!-- 分享代码 -->
						<div class="cl">
						{$_G['jameson_read']['fenxiangdaima']}
						</div>
						<div class="xs1 xg2 mtn">
							{lang jameson_read:fxtishi}[{$_G['jameson_read']['jiangli']}{$_G['jameson_read']['fxtrametitle']}]
							{lang jameson_read:fxtishi2}
						</div>
					</div>
					{/if}
				</div>
			</div>
			<!--[diy=diy2]--><div id="diy2" class="area"></div><!--[/diy]-->
		</div>
		<div id="jameson_read_right">
			<div class="center mtn mbn" id="erweimadiv">
				<p class="xs1 xg1 mtm mbm">{lang jameson_read:shoujisaomiao}</p>
				<div id="erweimaimg" class="center"></div>
			</div>
			<h2 class="" id="toolsright">
				{if !$hasfavore}
					<a href="javascript:;" onclick="jamesonread.addBookStore({$columinfo['book_id']},this)">
					{lang jameson_read:shoucang}
				{else}
					<a href="./plugin.php?id=jameson_read&contrl=index&act=bookstore">
					{lang jameson_read:shujia}
				{/if}
				</a>
				<a href="javascript:;" onclick="jamesonread.open('shupingtextarea')" id="fashuping">{lang jameson_read:shuping}</a>
				{if $_G['jameson_read']['dstrameid']}
				<a href="javascript:;" onclick="jamesonread.open('dashangdiv')" id="dashang">{lang jameson_read:dashangbutton}</a>
				{/if}
			</h2>
		</div>
		{if $predata}
			<a id="prebutton" class="pre" href="{eval echo jamesonurl('thread', $predata['tid'], $predata['pid'], $_G['uid']);}"><span class="prebutton"></span>{lang jameson_read:shangyiye}</a>
		{/if}

		{if $nextdata}
			<a id="nextbutton" class="next" href="{eval echo jamesonurl('thread', $nextdata['tid'], $nextdata['pid'], $_G['uid']);}"><span class="nextbutton"></span>{lang jameson_read:xiayiye}</a>
		{/if}
	</div>
<div>
</div>
<div class="backToTop none" onclick='jQuery("html, body").animate({ scrollTop: 0 }, 120)' title="{lang jameson_read:fanhuidingbu}">{lang jameson_read:fanhuidingbu}</div>
<script src="./source/plugin/jameson_read/images/jquery.min.js"></script>
<script type="text/javascript">
	jQuery.noConflict();
</script>
<script type="text/javascript" src="{$_G['siteurl']}source/plugin/jameson_read/images/layer/layer.min.js?version=988"></script>
<script type="text/javascript" src="{$_G['siteurl']}source/plugin/jameson_read/ue-{eval echo strtolower(CHARSET);}/ueditor.parse.min.js?version=988" charset="utf-8"></script>
<script type="text/javascript" src="{$_G['siteurl']}source/plugin/jameson_read/images/st-utf-8.js?version=988" charset="utf-8"></script>
<audio preload id="playaudioelement" hidden controls="false" src="./plugin.php?id=jameson_read:yuyin&tid={$columinfo['tid']}&pid={$columinfo['pid']}&formhash={FORMHASH}"></audio>
<script type="text/javascript">
		var jamesonread = {
			localconfig:{fontsize:'20px',backcolor:'moren'},
			uid:discuz_uid,
			tid:"{$columinfo['tid']}",
			disabled:function (id){
				if(discuz_uid < 1){
					showWindow('login', 'member.php?mod=logging&action=login&referer='+encodeURIComponent(location.href));
					return false;
				}
				jQuery(id).attr('disabled',true)
				jQuery.post('./plugin.php?id=jameson_read&act=buytidsajax',jQuery("#goumaitips form").serialize(),function(res){
					if(res=='chongzhi'){
						jamesonread.gochongzhi();
					}else{
						layer.msg(res);
						location.reload(true)
					}
				})
			},
			noautobuy:function(em){
				jQuery.post('./plugin.php',{
					id:'jameson_read:ajax',
					optype:"noautobuy",
					formhash:'{FORMHASH}'
				},function(res){
					layer.msg('{lang jameson_read:quxiaozidongdingyue}');
					jQuery(em).text('{lang jameson_read:yiquxiao}')
				})
			},
			addBookStore:function(book_id,em){
				if(discuz_uid < 1){
					showWindow('login', 'member.php?mod=logging&action=login&referer='+encodeURIComponent(location.href));
					return false;
				}
				var index = layer.load();
				var url = './plugin.php?id=jameson_read:'+'ajax&optype=favoreaction&book_id='+book_id+'&formhash={FORMHASH}';
				var ajax = new Ajax('HTML');
				ajax.getHTML(url,function(res){
					layer.close(index);
					if(res == 'hasfavore'){
						layer.msg('{lang jameson_read:yishoucang}',{icon:6});
					}else if(res == 'sqlerror'){
						layer.msg('{lang jameson_read:weizhicuowu}',{icon:2});
					}else{
						em.innerHTML = '{lang jameson_read:yishoucang}';
					}
				});
			},
			initloadread : function(){
				var storeconfig = null;
				if(storeconfig = localStorage.getItem('jamesonread_pcconfig')){
					storeconfig = JSON.parse(storeconfig);
					if(storeconfig.fontsize){
						jamesonread.localconfig.fontsize = storeconfig.fontsize;
					}
					
					if(storeconfig.backcolor){
						jamesonread.localconfig.backcolor = storeconfig.backcolor; 
					}
				}
				jQuery("#jameson_read").attr('class',jamesonread.localconfig.backcolor);
				var lineheight = parseInt(jamesonread.localconfig.fontsize)>12?(1.8):1.6;
				jQuery("#jamesonbookcontent").css({fontSize:jamesonread.localconfig.fontsize+"px",lineHeight:lineheight});
				jQuery("#jamesonbookcontent").attr('data-size',jamesonread.localconfig.fontsize);
				var nocopy = parseInt('{$_G["jameson_read"]["nocopy"]}')?1:0;
				if(nocopy){
					jQuery("#jameson_read").attr('unselectable', 'on').css('user-select', 'none').on('selectstart', false);
					jQuery(document).on("contextmenu",function(e){
	                    e.preventDefault();
	                });
				}
				
			},
			changesize : function(type){
				if(!$("istext")){return false;}
				var cursize = jQuery("#jamesonbookcontent").attr('data-size');
				cursize = isNaN(parseInt(cursize))?20:parseInt(cursize);
				if(type == 'sub'){
					cursize = cursize < 2 ?0:(cursize-2);
				}else if(type=='add'){
					cursize += 2 ;
				}else{
					cursize = 20;
				}
				jamesonread.localconfig.fontsize = cursize;
				localStorage.setItem('jamesonread_pcconfig',JSON.stringify(jamesonread.localconfig));
				var lineheight = 1.8;
				jQuery("#jamesonbookcontent").css({fontSize:cursize+"px",lineHeight:lineheight});
				jQuery("#jamesonbookcontent").attr('data-size',cursize);
			},
			mulumenu:"<div class='layermsg dd' id='mulumenu'>{loop $bookinfo['fenjuan'] $muluvalue}<h3>{$muluvalue['j_title']}</h3><ul class='layer-ul'>{loop $muluvalue['colums'] $zhangjievalue}{eval $tidurl = jamesonurl('thread',$zhangjievalue['tid'],$zhangjievalue['pid'],$_G['uid']);}<li><a href='{$tidurl}'>{eval echo preg_replace('/\r|\n/ism','',$zhangjievalue['subject']);}{if $zhangjievalue['price']>0}<em class='xi2 xs2 marlm'>[{$zhangjievalue['price']}{$_G['jameson_read']['trametitle']}]</em>{/if}</a></li>{/loop}</ul>{/loop}</div>",
			shupingtextarea:'<div id="shupingtextarea" class="shupingtextarea layermsg"><h3>{lang jameson_read:fashuping}</h3><textarea autofocus placeholder="{lang jameson_read:sanshidaobabai}{$_G['jameson_read']['shupinglength']}" class="mtm mbm "  name="textvalue" id="textarea"></textarea><a class="pure-button button-error" href="javascript:;"  id="submitshuping" onclick="jamesonread.postshupingread(this,{$columinfo['book_id']})">{lang jameson_read:tijiao}</a></div>',
			shuqiandiv:'<div id="shuqiandiv" class="shuqiandiv layermsg"><h3 class="{if $hasmark}hasmark{/if}" id="shuqianh2">{if $hasmark}{lang jameson_read:yijiarushuqian}{else}<a href="javascript:;" onclick="jamesonread.addmark({$columinfo['tid']})">{lang jameson_read:jiarushuqian}+</a>{/if}</h3><ul class="layer-ul">{if $marks}{loop $marks $mark}<li><a href="{eval echo jamesonurl('thread',$mark['tid'],$mark['pid'],$_G['uid']);}" class="layer-link-title">{$mark['subject']}</a><a href="javascript:;" onclick="jamesonread.delmark({$mark['id']},this)" class="layer-link-action">[-]</a></li>{/loop}{else}<div class="mtm marrm marlm center message xs3">{lang jameson_read:haimeiyoutianjiashuqian}</div>{/if}</ul></div>',
			openinfo:function(content){
				layer.open({
				  type: 1,
				  title:'{$bookinfo["book_name"]}',
				  offset:'20px',
				  shadeClose:true,
				  area: ['600px', '500px'], //宽高
				  content: content
				});
			},
			postshupingread:function(em,book_id){
				if(!discuz_uid){
					jamesonread.login()
				}
				var text = trim($("textarea").value);
				if(strlen(text)<5){
					layer.msg('{lang jameson_read:sanshidaobabai}{$_G["jameson_read"]["shupinglength"]}',{icon:2});
					return;
				}else if(strlen(text)>parseInt('{$_G["jameson_read"]["shupinglength"]}')){
					layer.msg('{lang jameson_read:changdubudedayu}{$_G["jameson_read"]["shupinglength"]}',{icon:2});
					return false;
				}
				var data = "book_id="+book_id+"&text="+text+"&nums={$_G['jameson_read']['dianpingnums']}";
				var ajax = new Ajax('HTML');
				ajax.post('./plugin.php?id=jameson_read:'+'ajax&optype=postshuping&formhash={FORMHASH}',data,function(res){
					if(res == 'hasshuping'){
						layer.msg('{lang jameson_read:yifabuguoshuping}',{icon:2});
					}else if(res != 'success'){
						layer.msg('{lang jameson_read:weizhicuowu}',{icon:2});
					}else{
						layer.msg('{lang jameson_read:fabushupingchenggong}',{icon:1});
						setTimeout("layer.closeAll()",1000);
					}
				});
			},
			gochongzhi:function(title){
				if(!discuz_uid){
					jamesonread.login()
				}
				layer.confirm('{lang jameson_read:nide}['+title+']{lang jameson_read:buzuqingchongzhi}', {
					  btn: ['{lang jameson_read:quchongzhi}','{lang jameson_read:suanle}'] //按钮
					}, function(){
						location.href = "{$_G['jameson_read']['pcchongzhi']}";
					});
			},
			yuepiao:'{eval echo intval($bookinfo["yuepiao"])}',
			tuijianpiao:'{eval echo intval($bookinfo["tuijianpiao"])}',
			cuigengpiao:'{eval echo intval($bookinfo["cuigengpiao"])}',
			open : function(id){
				if(id != 'mulumenu' && discuz_uid < 1){
					showWindow('login','member.php?mod=logging&action=login&referer='+encodeURIComponent(location.href));
					return false;
				}
				switch(id){
					case 'shupingtextarea':
						jamesonread.openinfo(jamesonread.shupingtextarea);
					break;
					case 'dashangdiv':
						var dashanghtml = '<div class="mtm pure-g shupiaowrap mbm text-center"><div class="pure-u-1-4"><div class="shupiao ptm pbm"><p class="piao_dq mtm mbm xg1">{lang jameson_read:dangqianyou}<em  id="piao_num_101">'+jamesonread.yuepiao+'</em></p><a href="javascript:;" onclick="jamesonread.toupiao(101,{$bookinfo['uid']},{$piaoinfo[101]['image']},{$piaoinfo[101]['url']},\'{$_G["setting"]["extcredits"][$piaoinfo[101]["image"]]["title"]}\')" class="pure-button button-error mtm mbm">{lang jameson_read:tou}{$piaoinfo[101]["name"]}</a><p class="piao_money mtm mbm xg1">1{lang jameson_read:jizhang}{$piaoinfo[101]["name"]}={$piaoinfo[101]["url"]}{$_G["setting"]["extcredits"][$piaoinfo[101]["image"]]["title"]}</p></div></div><div class="pure-u-1-4"><div class="shupiao ptm pbm"><p class="piao_dq mtm mbm xg1">{lang jameson_read:dangqianyou}<em  id="piao_num_102">'+jamesonread.tuijianpiao+'</em></p><a href="javascript:;" onclick="jamesonread.toupiao(102,{$bookinfo['uid']},{$piaoinfo[102]['image']},{$piaoinfo[102]['url']},\'{$_G["setting"]["extcredits"][$piaoinfo[102]["image"]]["title"]}\')" class="pure-button button-error mtm mbm">{lang jameson_read:tou}{$piaoinfo[102]["name"]}</a><p class="piao_money mtm mbm xg1">1{lang jameson_read:jizhang}{$piaoinfo[102]["name"]}={$piaoinfo[102]["url"]}{$_G["setting"]["extcredits"][$piaoinfo[102]["image"]]["title"]}</p></div></div><div class="pure-u-1-4"><div class="shupiao ptm pbm"><p class="piao_dq mtm mbm xg1">{lang jameson_read:dangqianyou}<em   id="piao_num_103">'+jamesonread.cuigengpiao+'</em></p><a href="javascript:;" onclick="jamesonread.toupiao(103,{$bookinfo['uid']},{$piaoinfo[103]['image']},{$piaoinfo[103]['url']},\'{$_G["setting"]["extcredits"][$piaoinfo[103]["image"]]["title"]}\')" class="pure-button button-error mtm mbm">{lang jameson_read:tou}{$piaoinfo[103]["name"]}</a><p class="piao_money mtm mbm xg1">1{lang jameson_read:jizhang}{$piaoinfo[103]["name"]}={$piaoinfo[103]["url"]}{$_G["setting"]["extcredits"][$piaoinfo[103]["image"]]["title"]}</p></div></div><div class="pure-u-1-4"><div class="shupiao ptm pbm"><p class="piao_dq mtm mbm xg1">{lang jameson_read:yong}{$_G["jameson_read"]["dstrametitle"]}{lang jameson_read:dashangbutton}</p><p class="piao_input mtm mbm"><input type="number" value="50" id="dashangnum"></p><a href="javascript:;" onclick="jamesonread.dashang()" class="pure-button button-error mtm mbm">{lang jameson_read:dashangbutton}</a><p class="piao_money mtm mbm xg1 none">{lang jameson_read:gong}<span id="dqdsnums">{$_G["jameson_read"]["dstramenum"]}</span>{$_G["jameson_read"]["dstrametitle"]}</p></div></div></div>';
						jamesonread.openinfo(dashanghtml)
					break;
					case 'shuqiandiv':
						jamesonread.openinfo(jamesonread.shuqiandiv)
					break;
					case 'mulumenu':
						jamesonread.openinfo(jamesonread.mulumenu);
					break;
				}
			},
			dashang:function(){
				if(!discuz_uid){
					showWindow('login', 'member.php?mod=logging&action=login&referer='+encodeURIComponent(location.href));
					return;
				}
				if(!$("dashangnum")){
					return false;
				}
				var dashangnum = parseInt($("dashangnum").value);
				var tramenum = parseInt(jQuery("#dq_extcredits{$_G['jameson_read']['dstrameid']}").val());
				if(isNaN(dashangnum) || dashangnum<1 ){
					layer.msg('{lang jameson_read:weitianxiedashang}',{icon:2});
					return;
				}
				if(dashangnum > tramenum){
					jamesonread.gochongzhi('{$_G["jameson_read"]["dstrametitle"]}');
					return false;
				}
				if('{$_G["uid"]}'=='{$bookinfo["uid"]}'){
					layer.msg('{lang jameson_read:bunengdashangziji}',{icon:2});
					return;
				}
				jQuery.post('./plugin.php?id=jameson_read:ajax',{
					optype:"dashang",
					formhash:'{FORMHASH}',
					author:"{$bookinfo['author']}",
					num:dashangnum,
					book_id:"{$bookinfo['book_id']}"
				},function(res){
					if(res == 'buzu'){
						layer.msg('{lang jameson_read:buzuqingchongzhi}',{icon:2});
					}else if(res == 'error'){
						layer.msg('{lang jameson_read:weizhicuowu}',{icon:2});
					}else if(res == 'success'){
						layer.msg('{lang jameson_read:ganxie}',{icon:1});
						$("dqdsnums").innerHTML = tramenum-dashangnum;
						jQuery("#dq_extcredits{$_G['jameson_read']['dstrameid']}").val(tramenum-dashangnum);
						$("dashangnum").value = '';
						setTimeout("layer.closeAll()",1500);
					}
				});
			},
			toupiao:function (type,author_id,exid,money,title) {
				if(!discuz_uid){
					jamesonread.login()
				}
				if(parseInt(trim("{$_G['uid']}")) == author_id){
					layer.msg("{lang jameson_read:bunengtougeiziji}",{icon:2});
					return;
				}
				var hastotal = parseInt(jQuery("#dq_extcredits"+exid).val());
				if(money > hastotal){
					jamesonread.gochongzhi(title)
					return false;
				}
				jQuery.post('./plugin.php?id=jameson_read:ajax',{
					optype:'toupiao',
					type:type,
					author_id:author_id,
					formhash:'{FORMHASH}',
					book_id:'{$bookinfo["book_id"]}'
				},function(res){
					if(res=='error'){
						layer.msg('{lang jameson_read:weizhicuowu}',{icon:2});
					}else if(res == 'buzu'){
						layer.msg("{lang jameson_read:nide}["+title+"]{lang jameson_read:buzuhuoweitianxie}",{icon:2});
						return false;
					}else if(res == 'success'){
						jQuery("#dq_extcredits"+exid).val(hastotal-money);
						layer.msg('{lang jameson_read:ganxienidetoupiao}',{icon:1});
						jQuery("#piao_num_"+type).text(parseInt(jQuery("#piao_num_"+type).text())+1);
						if(type==101){
							jamesonread.yuepiao++;
						}else if(type==102){
							jamesonread.tuijianpiao++;
						}else if(type==103){
							jamesonread.cuigengpiao++;
						}
						setTimeout("layer.closeAll()",1500);
					}
				});
			},
			addmark:function(tid){
				if(discuz_uid < 1){
					showWindow('login', 'member.php?mod=logging&action=login&referer='+encodeURIComponent(location.href));
					return false;
				}
				var index = layer.load();
				var tid = parseInt(tid)?parseInt(tid):0;
				var book_id = parseInt('{$columinfo["book_id"]}')?parseInt('{$columinfo["book_id"]}'):0;
				var ajax = new Ajax('HTML');
				var url = './plugin.php?id=jameson_read:'+'ajax&optype=addbookmark&book_id='+book_id+'&tid='+tid+'&formhash={FORMHASH}';
				ajax.getHTML(url,function(res){
					layer.close(index);
					if(!parseInt(res)){
						layer.msg('{lang jameson_read:chuxiancuowu}',{icon:2});
					}else{
						layer.msg('{lang jameson_read:tianjiachenggong}',{icon:1});
						jQuery("#shuqianh2").html('{lang jameson_read:yijiarushuqian}');
						jQuery("#shuqianh2").addClass('hasmark');
					}
				});
			},
			delmark:function(id,em){
				if(!discuz_uid){
					jamesonread.login()
				}
				var id = parseInt(id)?parseInt(id):0;
				var ajax = new Ajax('HTML');
				var url = './plugin.php?id=jameson_read:'+'ajax&optype=delmark&pkid='+id+'&formhash={FORMHASH}';
				ajax.getHTML(url,function(res){
					if(res == 'error'){
						layer.msg('{lang jameson_read:chuxiancuowu}',{icon:2});
					}else{
						layer.msg('{lang jameson_read:shanchuchenggong}',{icon:1});
						jQuery(em).parent().addClass('none');
					}
				});
			},
			setback:function(cls){
				jQuery("#jameson_read").attr('class',cls);
				jQuery("html").attr('class',cls);
				jamesonread.localconfig.backcolor = cls;
				localStorage.setItem('jamesonread_pcconfig',JSON.stringify(jamesonread.localconfig));
			},
		    login:function(){
		    	if(!discuz_uid){
					showWindow('login', 'member.php?mod=logging&action=login&referer='+encodeURIComponent(location.href));
					return false;
				}
		    },
		    currenttime:0,
		    play:function(tid,pid){
		    	var audio = document.getElementById('playaudioelement');
		    	if(audio.paused){
		    		//返回true，是暂停，则开发播放
		    		audio.play();
		    		if(!jamesonread.currenttime){
		    			layer.msg('{lang jameson_read:jiazaihoubofang}',{icon:1})
		    		}
	    			jQuery("#playaudio").text('{lang jameson_read:langduzhong}');
	    			var timeid = setInterval(function(){
	    				jamesonread.currenttime++;
	    			},1000);
		    	}else{
		    		audio.pause();
		    		clearInterval(timeid);
	    			jQuery("#playaudio").text('{lang jameson_read:yizanting}')
		    	}
		    	jQuery("#playaudioelement").on('ended',function(){
					clearInterval(timeid);
		    		jamesonread.currenttime = 0;
		    	})
		    }
	};
	jQuery(window).keydown(function(event){
		if(event.keyCode==39){
			if(parseInt('{$nextdata["tid"]}')){
				location.href = '{eval echo jamesonurl("thread", $nextdata["tid"], $nextdata["pid"], $_G["uid"]);}';
			}else{
				layer.msg('{lang jameson_read:meiyoule}',{icon:5});
			}
		}else if(event.keyCode==37){
			if(parseInt('{$predata["tid"]}')){
				location.href = '{eval echo jamesonurl("thread", $predata["tid"], $predata["pid"], $_G["uid"]);}';
			}else{
				layer.msg('{lang jameson_read:meiyoule}',{icon:5});
			}
		}
	});
	jQuery(function(){
		jamesonread.initloadread();
		if(/TC_/i.test('{eval echo currentlang();}')){
		    jQuery("#u179stranlink").traditional({is_simplified:false});
		}else{
		    jQuery("#u179stranlink").traditional({is_simplified:true});
		}
		var qrcode = new QRCode(document.getElementById("erweimaimg"), {
			width : 120,
			height : 120
		});
		qrcode.makeCode('{$_G["jameson_read"]["shoujiurl"]}plugin.php?id=jameson_read&contrl=touch&act=read&tid={$columinfo["tid"]}&pid={$columinfo["pid"]}&fxuid={$_G["uid"]}');
		jQuery(window).on("scroll", function() {
		    var st = jQuery(document).scrollTop();
		    var winh = jQuery(window).height();
		    (st > 0)? jQuery(".backToTop").removeClass('none'): jQuery(".backToTop").addClass('none');
		});
		if(parseInt("{$_G['jameson_read']['mustlogin']}") && discuz_uid<1){
			showWindow('login', 'member.php?mod=logging&action=login&referer='+encodeURIComponent(location.href));
		}
		uParse('.messagecontent', {
		    rootPath: './source/plugin/jameson_read/ue-{eval echo strtolower(CHARSET);}/'
		})
	});
</script>
{loop $dquid $exid $dq}
	{if preg_match("/^extcredits/i",$exid)}
		<input type="hidden" id="dq_{$exid}" value="{$dq}" />
	{/if}
{/loop}
<div style="display: none"><!--{if $_G['setting']['statcode']}-->$_G['setting']['statcode']<!--{/if}--></div>
</body>
</html>